#include "strategy.h"
#include <iostream>

using namespace std;

void arrow::useweap()
{
	cout << "Use Arrow!" << endl;
}

void sword::useweap()
{
	cout << "Use Sword!" << endl;
}

void axe::useweap()
{
	cout << "Use Axe!" << endl;
}

void knife::useweap()
{
	cout << "Use Knife!" << endl;
}

void king::fight()
{
	cout << "The King:\t";
	if (this->weapon == NULL)
	{
		cout << "You don't have weapon, please set weapon!" << endl;
	}
	else
	{
		weapon->useweap();
	}
}

void queen::fight()
{
	cout << "The Queen:\t";
	if (this->weapon == NULL)
	{
		cout << "You don't have weapon, please set weapon!" << endl;
	}
	else
	{
		weapon->useweap();
	}
}

void knight::fight()
{
	cout << "The Knight:\t";
	if (this->weapon == NULL)
	{
		cout << "You don't have weapon, please set weapon!" << endl;
	}
	else
	{
		weapon->useweap();
	}
}

void troll::fight()
{
	cout << "The Troll:\t";

	if (this->weapon == NULL)
	{
		cout << "You don't have weapon, please set weapon!" << endl;
	}
	else
	{
		weapon->useweap();
	}
}

